1. Field of the Invention
The present invention relates to technology for correcting an analog image signal.
2. Description of the Related Art
In an image reading apparatus, light is irradiated on an original and the original is scanned line-by-line in the main scanning direction. The light reflected from the original image is focused on a photoelectric conversion device (a charge coupled device (CCD)). The output of the photoelectric conversion device is subjected to signal processing thereby obtaining image information of the original. FIG. 6 is a schematic diagram of relevant parts of an image reading apparatus having a sheet-through reading function. In a constitution shown in FIG. 6, it is possible to select two kinds of reading systems. In the first reading system, when an original 55 is placed on an original placing glass 51, a lamp 57 is turned on and a first carriage 59 and a second carriage 62 are moved in the right direction by a scanner motor to perform scanning and read the original 55. In the second reading system, the lamp 57 is turned on to read an original 56 conveyed by an original conveying device 54 without moving the first carriage 59 and the second carriage 62.
In both the reading systems, reflected light from the original 55 on the original placing glass 51 lighted by a light source for lighting an original surface (a lamp 57) is focused on a sensor surface of a photoelectric conversion device (a CCD 64) by a focusing lens 63 via a first mirror 58, a second mirror 60, and a third mirror 61 for scanning the original 55 to read image information thereof. An output signal of the photoelectric conversion device (the CCD 64) is converted into digital data by an analog-digital (AD) converter. In this way, original image data is digitally read. The original image information converted into the digital data is sent to an output device and outputted as a print. Alternatively, the original image information is sent to a storing device and stored.
In the image reading apparatus shown in FIG. 6, when an original image is scanned and read by moving the carriages, there is the following method as a method of scanning an image of the original 55 in the sub-scanning direction. For example, the first carriage 59 and the second carriage 62 for scanning are moved, while a fixed relation between the carriages are maintained, in an arrow direction in the figure (the sub-scanning direction) to scan the image. As scanning speed of the respective carriages for scanning in this case, for example, when speed of the first carriage 59 is set to V, scanning speed of the second carriage 62 is designed to be V/2.
When the original is scanned in this way, prior to the reading of the original, correction data is obtained. Reading data of a reference white board for shading correction 53 provided between a sheet-through reading unit 52 and the original placing glass 51 shown in FIG. 6 is scanned to generate data for shading correction and store the data for shading correction in a memory. Image data of the original 55 or the original 56 is normalized according to the data for shading correction while being read. In this way, unevenness in a light amount distribution, unevenness in sensitivity of the CCD, fluctuation in an output, and the like in the image reading apparatus are corrected to accurately read the original image.
At the time of shading correction, processing for detecting an offset at an image data level and subtracting the offset from the image data is performed. In general, an output signal of the CCD has an offset of about 3 volts to 6 volts. To cancel this offset component, as shown in FIG. 7, an output signal of the CCD is subjected to alternating-current (AC) coupling to remove a direct current (DC) component and, then, a DC bias is applied to the output signal to set the output signal at a signal level suitable for an analog signal processing unit at a post stage. As shown in FIG. 8, this DC bias is determined in a fixed period (an assert period of CLP) in an image signal region (a region excluding a reset noise region) of an OPB section of a CCD output signal and is thereafter fixed (clamped). This DC bias voltage is a reference voltage for sample-holding an image signal. To change image data subjected to AD conversion to output data having a fixed offset after the sample-hold, the fixed offset is added to the analog image signal data after the clamp. The assert period of CLP during an input clamp period in which this clamp is performed is referred to as a black level clamp period (OPBCLP). The addition of the offset is performed to accurately detect a black level containing a noise component and digitally subtract the black level at the time of shading correction.
However, when the offset of the CCD fluctuates, the offset level of the output image data after the AD conversion fluctuates as well. Therefore, as shown in FIG. 9, to detect a difference between an offset level of image data subjected to digital conversion and a target offset level and cancel the difference, a feedback loop for changing an analog offset amount added to image signal data after input clamp is formed. According to this feedback loop, an influence on the image data due to offset fluctuation is reduced. In FIG. 9, a CCD 11 is a photoelectric conversion device that reads an original image. A clamp circuit 12 is a circuit that holds a level of an analog image signal constant. An adding circuit 13 is a circuit that adds a feedback value to the analog image signal. A sample-hold circuit (CDS/SH) 14 is a circuit that temporarily holds a value of the analog image signal. An amplifier (PGA) 15 is an amplifier with variable amplification. An analog-digital converter (ADC) 16 is a circuit that converts the analog image signal into digital image data. A black-level-adjustment-value calculating circuit 17 is an arithmetic circuit that calculates a feedback value for adjusting an offset using a black-level target value and an adjustment coefficient. A digital-analog circuit (DAC) 18 is a circuit that calculates a difference between the black-level target value and a black level value of the digital image data.
A method of acquiring offset data is explained with reference to FIGS. 10 and 11. When the image reading apparatus is instructed to execute a scan operation, a lamp is turned on to start an original reading operation. Prior to the original reading operation, offset data of a black level subtracted from image data at the time of shading correction is acquired. As this offset data, as shown in FIG. 10, data of an OPB section (an optical shielding region) of a CCD is generally used. After the acquisition of the offset data of the black level is completed, in the case of a Book scan operation, as shown in FIG. 11, the image data is read while the first carriage moves to scan a reference white board and the original.
When the reference white board is scanned, white level data used for the shading correction is generated. The shading correction for an original reading region is executed using the white level data and black offset data. In the shading correction, an arithmetic operation described below is performed:Dsh(n)=(Dorg(n)−B)/(Dw(n)−B)×255where
Dsh(n): nth pixel data after shading correction
Dorg(n): nth pixel original data
Dw(n): nth pixel reference white board reading data
B: black level (OPB section) reading data.
Acquisition of black-level offset data is executed before a scan operation is started. When an offset level fluctuates during original reading, a deficiency of an image occurs. Therefore, offset fluctuation during original reading is coped with as follows. A difference between output data of the black level, (an OPB section or an idle transfer section) and output target data is detected for every scan for one line of the CCD. Feedback to an offset adjusting unit (a DAC) is performed for each line with fixed responsiveness given to the feedback. In this way, output data of the black level is set to a fixed level. In such an offset follow-up system, it is essential to give appropriate responsiveness with importance attached to stability to the feedback to prevent the feedback from easily following up fluctuation due to noise.
To realize a stable feedback response, a feedback amount is determined as follows. An average (D(n)) of image data in a black-level-correction-data capturing period (a BLKSAMPLE period) is calculated to detect a difference between the average and a target level. The difference is multiplied by a fixed coefficient (1/A) to determine an adjustment value to be fed back. In other words, an arithmetic operation of the following equation is performed:DAC(n+1)=DAC(n)+(BLACKTARGET−D(n))×(1/A)where
DAC(n+1): Feedback amount to the DAC in the next line
DAC(n): Feedback amount to the DAC in the present line
BLACKTARGET: Black-level target value
D(n): Black-level reading level in the present line
1/A: Adjustment coefficient
n: Line number.
In this way, in reading an original image with a scanner, generation of black level data used for black level subtraction at the time of shading correction is executed before an original reading operation is started. As measures for coping with offset fluctuation during original reading, a difference between output data of a black level and an output target data is detected and feedback to the offset adjusting unit (the DAC) is performed with fixed responsiveness given to the feedback to set the output data of the black level to a fixed level. The responsiveness is appropriately set to prevent the feedback from following up fluctuation due to noise. When fluctuation in an offset is gentle, it is easy to set the appropriate responsiveness and it is possible to perform sufficient offset adjustment. Several examples of conventional technologies related to this are described below.
An “imaging apparatus” disclosed in Japanese Patent Application Laid-Open No. 2003-198953 is an imaging apparatus with which an image is not deteriorated even if intense light enters near a shielding area (an optical black (OB) area) of an imaging unit. The imaging unit has a light receiving area formed by a plurality of pixels for performing photoelectric conversion and a shielding area formed by a plurality of pixels for performing photoelectric conversion, which are shielded to form a black reference signal. The shielding area of the imaging unit is divided into a plurality of blocks. Outputs of the respective blocks of the shielding area are integrated. Integral values of the respective blocks are compared by a shielding-area-abnormality detecting unit to detect abnormalities of the pixels in the shielding area.
A “digital still camera” disclosed in Japanese Patent Application Laid-Open No. 2004-080168 reduces darkening due to a black level difference between an effective pixel area and an OB area. Optical information of condensed light is photoelectrically converted and amplified by a CCD and converted into a digital code by an A/D conversion circuit. A signal level of the OB area is set to zero with an OB clamp circuit and an offset amount is added to the signal level. Signal levels of the OB area are integrated and averaged. An amount identical with the integration average is added to or subtracted from a video signal.
An “imaging apparatus” disclosed in Japanese Patent Application Laid-Open No. 2004-222185 is an imaging apparatus that can clamp an imaging signal at a stable reference level and obtain a satisfactory image. A CCD has an effective imaging area for receiving imaging light from a subject and a shielded optical area (an OB area) around the effective imaging area. A vertical OB integration circuit integrates signal levels of respective blocks of a vertical OB area divided into a plurality of blocks. When it is judged from an integration result of the vertical OB integration circuit that the sun is located at the right end of the effective imaging area, a clamp position is determined as a left-side vertical OB area. Based on the determination, a clamp pulse corresponding to the left-side vertical OB area is generated in a clamp pulse generating circuit. An imaging signal is clamped based on the clamp pulse.
A “solid-state imaging device” disclosed in Japanese Patent Application Laid-Open No. 2005-102266 is a CCD-type solid-state imaging device having a driving circuit built therein that can be driven at high speed, consumes low power, and is highly integrated and capable of being driven at a single power-supply pulse. Vertical charge transfer is performed by a timing generating unit and a driving-pulse generating unit that generates a negative pulse. Vertical scanning is performed by a row-selection control unit and a transfer pulse generating unit that applies a high-voltage transfer pulse to a selected row. After a charge is amplified and held by an amplifying unit provided for each vertical transfer unit, horizontal scanning is performed by a horizontal scanning circuit. A vertical-charge transfer unit has a charge-transfer control unit. Both sweep-out of unnecessary charges from a reset switch and limitation of a band of an amplifier are realized.
A “smear correction method for a CCD solid-state imaging device” disclosed in Japanese Patent Application Laid-Open No. 2005-159564 is a method that makes it possible to relax overcorrection at the time of detection of a large smear by controlling noise in the horizontal direction of a smear signal extracted from a smear detection line and applying proper gain adjustment to the smear signal. Gain adjustment is applied to the smear signal extracted from the smear detection line to reduce a level of the large smear signal. Median values of noise are sequentially detected from respective designated areas in the horizontal direction of the smear signal to control noise in the horizontal direction of the smear signal.
An “imaging apparatus” disclosed in Japanese Patent Application Laid-Open No. 2005-176115 is an imaging apparatus that can accurately reproduce a black level of an effective pixel section even if a part of an optical black (OB) signal of an imaging device is not an accurate black level signal. According to an imaging condition and a subject, an optical black (OB) area referred to in calculating a black level is switched. An abnormal signal generated in the OB area is detected. The OB area in which the abnormal signal is generated is not used as digital clamp data for digital clamp.
However, in the conventional offset adjusting method, it is difficult to realize both responsiveness to sudden fluctuation in an offset and stability. Usually, since the offset follow-up setting with importance attached to stability is performed, when sudden offset fluctuation occurs, offset adjustment does not follow up the offset fluctuation. When an offset of the CCD suddenly fluctuates because of a smear (light leakage), in the offset follow-up setting with importance attached to stability, offset adjustment does not follow up the sudden offset fluctuation. Thus, as shown in FIG. 12, fluctuation in density of an image occurs over several tens lines. To follow up the sudden offset fluctuation, it is necessary to give high-speed responsiveness to offset adjustment. Then, as shown in FIG. 13, offset adjustment responds to fluctuation due to noise. As a result, an image tends to be deteriorated by noise.